load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("android_devxx")

source_listing()

# This target is for code that needs access to internal Java compiler APIs. We should keep it
# as small as possible to have good compatibility with different versions of the compiler.
buck_java_library(
    name = "extra",
    srcs = glob(["*.java"]),
    extra_arguments = [
        "--add-exports",
        "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
        "--add-exports",
        "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
    ],
    visibility = [
        "PUBLIC",
    ],
    deps = [
        "prelude//toolchains/android/third-party:asm",
        "prelude//toolchains/android/third-party:jsr305",
    ],
)
